<?php

namespace App\Http\Controllers\Web;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Model\News;
class NewsController extends Controller
{
    //
    public function index(Request $request){
        $navs =['公司新闻','行业动态','口岸动态','航运保险','航运金融'];

        return view('news',[
            'navs'=>$navs,
            'currentNav' => 'news',
            'type' => $request->type??0,
            'title' => $navs[$request->type??0],
            'news' => News::getData($request->type??0,$request->page??1),
        ]);
    }
}
